﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Zj.CourseManage.Domain.Core;

namespace Zj.CourseManage.DTO.Common
{
    /// <summary>
    /// teacher  data transfer object 
    /// </summary>
    public class TeacherDTO
    {
        [Display(Name = "编号")]
        public int Id { get; set; }

        [Required(ErrorMessage = "教师姓名必填")]
        [StringLength(30, MinimumLength = 2, ErrorMessage = "教师姓名最长不能超过30个字符，最短不能少于2个字符")]
        [Display(Name = "教师姓名")]
        public string Name { get; set; }



        [Display(Name = "入职日期")]
        [DisplayFormat(DataFormatString ="{0:yyyy-MM-dd}")]
        [DataType(DataType.Date)]
        public DateTime HireDate { get; set; }


        public virtual ICollection<CourseAssignment> CourseAssignments { get; set; }

        
        [Display(Name = "办公室名称")]
        [DisplayFormat(NullDisplayText ="暂未分配科室")]
        public virtual Office Office { get; set; }

        public int OfficeId { get; set; }
    }
}
